import Mock, { MockjsRequestOptions } from 'mockjs'
import { printReq } from '../common'
const Random = Mock.Random

export const adminInfo = (req: MockjsRequestOptions) => {
  const data = {
    admin_id: Random.integer(0,3),
    admin_name: Random.cname(),
    account: Random.integer(0,199),
    birth: Random.integer(19900000,20200000),
    gender: Random.integer(0,1),
    department_id: Random.integer(0,8),
    current_role_id: Random.integer(0,4),
    status: Random.integer(0,4),
    organ_id: Random.integer(0,4),
    idcard: `${Random.id()}`,
    position: '前端开发工程师',
  }

  const res = {
    code: 200,
    status: 20000,
    message: '请求成功',
    data
  }
  return printReq(res, req)
}